Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent IP addresses #2056

Merged
merged 4 commits into from
Mar 9, 2021
Merged

Agent IP addresses #2056

merged 4 commits into from
Mar 9, 2021

Conversation

raviserota
Copy link
Contributor

@raviserota raviserota commented Feb 18, 2021

Description

Modified sandcat agent to collect all non-loopback IPv4 addresses in use on its host. (mitre/gocat#48)
Modified agent object to include a list of host IP addresses. Also added this variable to list of variables to update with heartbeat. Finally, changed the agent front-end to display the list of host IP addresses in the agent modal.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Checked agent modal for sandcat agent, host IP addresses were listed. For other agents, IP address list was empty.
Ran pytest, all tests passed.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code

…e with heartbeat. Also updated frontend to include host IP addresses in agent modal.
@raviserota raviserota changed the title Virts 1801 agent ip addresses Agent IP addresses Feb 18, 2021
Copy link
Contributor

@mchan143 mchan143 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes here look good to me.

@raviserota go ahead and check off the boxes in your PR description up top. You should add back in the checklist options regarding tests (you updated tests already so that's good to check off) and also documentation. I think a PR to fieldmanual adding the new attribute to the list of agent attributes in How to Build Agents would be a good place to indicate this functionality for users who want their custom agents to report host IP addresses in the GUI.

@raviserota
Copy link
Contributor Author

Sounds good. Thanks for the PR tips.

@unkempthenry
Copy link
Contributor

@mchan143 if this looks good, can you you officially mark the review status as "approved" :)

@raviserota , will this break anything if we merge it in before mitre/gocat#48 ? Is caldera still compatible with agents that don't report IP addresses? (seems like it should be...)

@raviserota raviserota mentioned this pull request Mar 3, 2021
6 tasks
@raviserota raviserota requested a review from mchan143 March 3, 2021 22:06
@unkempthenry unkempthenry self-requested a review March 4, 2021 21:48
Copy link
Contributor

@unkempthenry unkempthenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done 👍

@unkempthenry unkempthenry assigned wbooth and unassigned unkempthenry Mar 4, 2021
@unkempthenry
Copy link
Contributor

unkempthenry commented Mar 4, 2021

@wbooth , this PR allows agents to report their IP addresses to the caldera server automatically.

Note: I noticed some unrelated issue with planners not loading with this branch and certain plugin commits (unsure the exact cause with my configuration), but everything worked great once I merged these changes with master's HEAD.

Also, the CI failures are unrelated to the content of this PR.

@wbooth wbooth merged commit ab8a607 into master Mar 9, 2021
@wbooth wbooth deleted the virts-1801-agent-ip-addresses branch March 9, 2021 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants